#include <iostream>
#include <complex>
#include <cmath>

using namespace std;

void print(const complex<double>&);

int main()
{
    complex<double> c1(2, 8);
    complex<double> c2(2, -8);
    complex<double> c3 = c1 * c2;

    cout << "c1: ", print(c1);
    cout << "c2: ", print(c2);
    cout << "c1 * c2: ", print(c3);

    return 0;
}

void print(const complex<double>& c)
{
    bool positive = c.imag() > 0;
    cout << c.real() << (positive ? " + " : " - ") << fabs(c.imag()) << "i" << endl;
}
